package com.google.guava.concurrent;

import java.util.stream.IntStream;

/**
 * @author fuc
 * @create 2020-10-11
 */
public class TokenBucketExample {

  public static void main(String[] args) {
    final TokenBucket tokenBucket = new TokenBucket();
    IntStream.range(0, 110)
        .forEach(
            i -> {
              new Thread(tokenBucket::buy).start();
            });
  }
}
